/**
 * @description: ip管理
 */

import type { CommonAPI } from '@/apis/types/all.ts'
import { defHttp } from '@/apis/http'

/** 查询ip */
export const getIpApi: CommonAPI<'/v1/ip', 'get'> = params =>
  defHttp.get(`/v1/ip`, { params })

/** 删除ip */
export const deleteIpApi: CommonAPI<'/v1/ip', 'delete'> = params =>
  defHttp.delete(`/v1/ip`, { params })

/** 创建ip */
export const addIpApi: CommonAPI<'/v1/ip', 'post'> = data =>
  defHttp.post(`/v1/ip`, data)

/** 修改ip */
export const updateIpApi: CommonAPI<'/v1/ip', 'put'> = data =>
  defHttp.put(`/v1/ip`, data)

/** ip详情 */
export const getIpInfoDetailApi: CommonAPI<'/v1/ip/info', 'get'> = params =>
  defHttp.get(`/v1/ip/info`, { params })
